package org.dearsoft.keepleaping.seam.example.dvdstore.accountdeposits;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.framework.EntityHome;

@Name("recordHome")
@Scope(ScopeType.CONVERSATION)
@AutoCreate
public class RecordHome extends EntityHome<Record> {
	
	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -6076273133283556356L;
	
	@In private long recordId;
	
	@Create
	public void create() {
		setId(recordId);
	}

	@Factory(autoCreate = true, scope = ScopeType.STATELESS)
	public Record getRecord() {
		return getInstance();
	}
	
}
